package com.yicong.taxi.api;

import com.yicong.taxi.api.entry.EntryResult;
import com.yicong.taxi.model.MsgAuth;
import com.yicong.taxi.model.UserInfo;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiService {

  //APP版本检测
//  @POST(value = "caipiao.txt")
//  Observable<UpdateInfo>queryVersion();
//
//  @GET(value = "main/VersionNumber/versionNumberList")
//  Observable<EntryResult<Versions>>queryVersion(@Header("Authorization") String token, @Query("sign") String sign, @Query("android") String android);
//
  //短信验证
  @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
  @POST(value = "restful/rpc")
  Observable<EntryResult<MsgAuth>>sendMsg(@Body RequestBody route);

  //短信验证
  @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
  @POST(value = "restful/rpc")
  Observable<EntryResult<MsgAuth>>register(@Body RequestBody route);
//
//  //用户注册
//  @FormUrlEncoded
//  @POST(value = "main/account/register")
//  Observable<EntryResult<UserInfo>>register(@Field("username") String username, @Field("password") String password, @Field("name") String name);

}
